package com.sjgtw.cloud.app.riskReporting.controller;

import com.sjgtw.cloud.app.riskReporting.domain.UserRealLocation;
import com.sjgtw.cloud.app.riskReporting.service.IUserRealLocationService;
import com.sjgtw.cloud.common.core.web.controller.BaseController;
import com.sjgtw.cloud.common.core.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 用户实时位置Controller
 * 
 * @author lvyoufang
 * @date 2024-06-01
 */
@RestController
@RequestMapping("/userRealLocation")
@Api(tags = "10 APP、用户实时位置")
public class UserRealLocationController extends BaseController
{
    @Autowired
    private IUserRealLocationService userRealLocationService;

   /* *//**
     * 查询用户实时位置列表
     *//*
    @ApiOperation(value = "查询用户实时位置列表")
    @GetMapping("/list")
    public TableDataInfo list(UserRealLocation userRealLocation)
    {
        startPage();
        List<UserRealLocation> list = userRealLocationService.selectUserRealLocationList(userRealLocation);
        return getDataTable(list);
    }

    *//**
     * 导出用户实时位置列表
     *//*
    @ApiOperation(value = "导出用户实时位置列表")
    @PostMapping("/export")
    public void export(HttpServletResponse response, UserRealLocation userRealLocation)
    {
        List<UserRealLocation> list = userRealLocationService.selectUserRealLocationList(userRealLocation);
        ExcelUtil<UserRealLocation> util = new ExcelUtil<UserRealLocation>(UserRealLocation.class);
	    try {
		    util.exportExcel(response, list, "用户实时位置数据");
	    } catch (IOException e) {
		    e.printStackTrace();
	    }
    }
*/
    /**
     * 获取用户实时位置详细信息
     */
    @ApiOperation(value = "获取用户实时位置详细信息")
    @GetMapping(value = "/{userId}")
    public AjaxResult getInfo(@PathVariable("userId") Long userId)
    {
        return AjaxResult.success(userRealLocationService.selectUserRealLocationByUserId(userId));
    }

    /**
     * 新增用户实时位置
     */
    @ApiOperation(value = "新增用户实时位置")
    @PostMapping
    public AjaxResult save(@RequestBody UserRealLocation userRealLocation)
    {
        return toAjax(userRealLocationService.save(userRealLocation));
    }

   /* *//**
     * 修改用户实时位置
     *//*
    @ApiOperation(value = "修改用户实时位置")
    @PutMapping
    public AjaxResult edit(@RequestBody UserRealLocation userRealLocation)
    {
        return toAjax(userRealLocationService.updateUserRealLocation(userRealLocation));
    }

    *//**
     * 删除用户实时位置
     *//*
    @ApiOperation(value = "删除用户实时位置")
	@DeleteMapping("/{userIds}")
    public AjaxResult remove(@PathVariable String[] userIds)
    {
        return toAjax(userRealLocationService.deleteUserRealLocationByUserIds(userIds));
    }*/
}
